#!/usr/bin/env bash

set -o nounset
set -o errexit
set -o pipefail

STARTUP_DIR="$( cd "$( dirname "$0" )" && pwd )"

source ${STARTUP_DIR}/../settings.sh
source ${STARTUP_DIR}/get-argocd-server-url

KUBECTL="kubectl --context=${KUBE_CONTEXT}"

ADMIN_PASSWORD=$(${KUBECTL} get pods -n argocd -l app.kubernetes.io/name=argocd-server -o name | cut -d'/' -f 2)

echo ""
echo "url: https://"$(getUrl)
echo "user: admin"
echo "password: ${ADMIN_PASSWORD}"
echo ""

